package tjs.study.notes.dotest.jvm.step;

/**
 * Created by Nicky.Tang on 2021/10/22 10:00 下午
 *
 * @since 02.12.10
 */
public class StaticParent {
    public static int before_1 = 128;
    public static final int before_2 = 129;

    static {
        before_1 = before_1 + before_2;
        System.out.println("before_1："+StaticParent.before_1);

        // 因为准备阶段给的是null，初始阶段又要等父类加载完，所以NullPointerException
        //StaticSon. before_2=StaticSon. before_2+1;

        after_1 = -12883;
        //Error:(15, 17) java: 非法前向引用
//        after_1=after_1+after_2;
//        System.out.println(after_1);
    }

    public static int after_1 = -128;
    public static final int after_2 = -129;

}
